1. Field of the Invention
The invention relates generally to analog and digital signal processing. More specifically, the invention relates to the implementation of binary encoders for use in analog-to-digital converters.
2. Related Art
In the art of mixed-mode signal processing, so-called xe2x80x9cthermometer-to-binaryxe2x80x9d coders are used in xe2x80x9cFlashxe2x80x9d analog-to-digital (A/D) converters to encode the output of a set of 2nxe2x88x921 comparators into an n-bit binary code. A typical flash A/D converter is depicted in FIG. 1. The input (represented as a voltage signal) is compared to a set of thresholds (generated from a positive reference and negative reference by a resistor ladder or other means). The comparators generate a so-called thermometer code, in which the value of the input signal is represented by a binary code in which increasing numbers of bits are turned on, as shown in Table 1 of the Appendix. For digital signal processing applications, the more compact binary code is ordinarily used to represent the signal. The A/D converter in such cases must include an encoder to convert from one format to another. However, as shown below, conventional encoders consume a significant amount of power and die area.
FIG. 2 shows a conventional thermometer-to-binary coder. The coder 200 first converts from the binary code to a xe2x80x9cone hotxe2x80x9d code, which is then used to address a read-only memory to generate the binary code. The one-hot code is a code in which each symbol is represented by a vector that has one element equal to one while all of the other elements are equal to zero. Thus, in a one-hot code, there is a bit position for every symbol and the number of symbols determines the length of each codeword. While such encoding is easy to decode (since only one bit needs to be discovered), it can often add significant cost when implemented in digital circuitry.
Referring to FIG. 2, at each of the AND gates 210, the thermometer code bit is combined with the inverse of the next higher bit. Thus, the bits T0 and xcx9cT1 are combined by an AND logic gate from AND gates 210 to yield the one-hot code C0. Likewise, the one-hot code C1 is obtained by combining the bit T1 with the inverse of bit T2 (xcx9cT2) at another parallel AND logic gate. In general, the intermediate one-hot code Ci is obtained from Ti∩xcx9cTi+1. The one-hot code Ci is used to address the memory bank (shown implemented in MOS transistors) that then read out the corresponding binary code B0, B1, B2, B3. The number of transistors used for each one-hot code varies, as depicted in FIG. 2. A thermometer to binary encoder if implemented in a CMOS technology would use a total of at least 2Nxe2x88x921(N+12)+2Nxe2x88x926 transistors, where N is the number of bits in the resulting binary code. If implemented in bipolar technology, such an encoder would use at least 2Nxe2x88x921(N+18)+3Nxe2x88x929 transistors. One problem with the encoder of FIG. 2 is its susceptibility to so-called xe2x80x9cbubblexe2x80x9d codes, which are invalid thermometer codes where the high signals are not contiguous. Bubble codes occur as a result of thermal noise in the comparators.
FIG. 3 illustrates another conventional thermometer-to-binary coder. This encoder is not as sensitive as that of FIG. 2 to xe2x80x9cbubble codesxe2x80x9d. The response of the encoders of FIGS. 2 and 3, to various bubble codes is shown in Table 2 of the Appendix. The reduced sensitivity of the encoder of FIG. 3 is evident from the fact that the encoded value is always one of the two ambiguous interpretations of the bubble code. However, the FIG. 3 encoder is expensive in terms of the number of transistors used. It uses a minimum of 2Nxe2x88x921(N+16)+2Nxe2x88x926 transistors in CMOS technology, or a minimum of 2Nxe2x88x921(N+26)+3Nxe2x88x9217 transistors in bipolar technology. It also uses a more expensive logic than the coder of FIG. 2 in that three-input AND gates and various inverting terminals are used in the one-hot code determination.
Thus, there is a need for a thermometer to binary code converter which is less expensive than conventional converters and is also less sensitive to bubble thermometers than conventional converters.
The invention consists of an improved thermometer-to-binary coder in which the bits of the thermometer code are used to directly generate the binary code without using an intermediate one-hot code. The improved coder manipulates the observable common features between the thermometer code and the resulting binary code. The thermometer code bits are grouped according these observable common features and then a selection process which operates in layers, selects thermometer code bits that can be utilized as binary code bits.